package domain;

import java.util.ArrayList;


public class GroupBid {

	private String owner;
	private ArrayList<String> groupUser;	
	private int auctionId;
	private double price;
	private boolean overun;
//	private ArrayList<Boolean> confirm;
	
	public GroupBid(String owner, int auctionId, double price) {
		super();
		this.owner = owner;
		this.auctionId = auctionId;
		this.price = price;
		groupUser = new ArrayList<String>();
//		confirm = new ArrayList<Boolean>();
	}
	
//	public boolean containsEnoughConfirms(){
//		boolean full = false;
//		synchronized (this) {
//			if(confirm.size() >= 2){
//				full = true;
//			}			
//		}
//		return full;
//	}
//	
//	public boolean containsUser(User user){
//		boolean bool = false;
//		synchronized (this) {
//			bool = groupUser.contains(user);
//		}
//		return bool;
//	}
	

	/**
	 * @return the owner
	 */
	public String getOwner() {
		return owner;
	}

	/**
	 * @return the overun
	 */
	public boolean isOverun() {
		return overun;
	}

	/**
	 * @param overun the overun to set
	 */
	public void setOverun(boolean overun) {
		this.overun = overun;
	}

	/**
	 * @param owner the owner to set
	 */
	public void setOwner(String owner) {
		this.owner = owner;
	}

	/**
	 * @return the groupUser
	 */
	public ArrayList<String> getGroupUser() {
		return groupUser;
	}

	/**
	 * @param groupUser the groupUser to set
	 */
	public void setGroupUser(ArrayList<String> groupUser) {
		this.groupUser = groupUser;
	}

	/**
	 * @return the auctionId
	 */
	public int getAuctionId() {
		return auctionId;
	}

	/**
	 * @param auctionId the auctionId to set
	 */
	public void setAuctionId(int auctionId) {
		this.auctionId = auctionId;
	}

	/**
	 * @return the price
	 */
	public double getPrice() {
		return price;
	}

	/**
	 * @param price the price to set
	 */
	public void setPrice(double price) {
		this.price = price;
	}

//	/**
//	 * @return the confirm
//	 */
//	public ArrayList<Boolean> getConfirm() {
//		return confirm;
//	}
//
//	/**
//	 * @param confirm the confirm to set
//	 */
//	public void setConfirm(ArrayList<Boolean> confirm) {
//		this.confirm = confirm;
//	}

	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "GroupBid [owner=" + owner + ", groupUser=" + groupUser
				+ ", auctionId=" + auctionId + ", price=" + price + "]";
	}
	
	
	
	
	
	

}
